var t = 0, a = 0;

Component({
    properties: {
        goodsData: {
            type: null
        },
        datas: {
            type: null
        }
    },
    lifetimes: {
        attached: function() {
            t = 0, a = 0;
        }
    },
    data: {
        activitys1: [],
        activitys2: [],
        showLoading: !1,
        imgCount: 0
    },
    methods: {
        jumpDetails: function(t) {
            var a = t.currentTarget.dataset.stickid;
            wx.navigateTo({
                url: "/packageC/micro_communities/microCommentDetails/microCommentDetails?stickId=" + a
            });
        },
        onImageError: function(t) {
            console.log("图片加载发生错误"), this.data.imgCount += 1, this.onImageLoad({
                currentTarget: {
                    id: t.currentTarget.id
                },
                detail: {
                    width: 160,
                    height: 160
                },
                type: "error"
            });
        },
        onImageLoad: function(i) {
            for (var e = i.currentTarget.id, o = i.detail.width, s = i.detail.height, n = this.data.goodsData, r = null, d = o / s, g = 0; g < n.length; g++) if (n[g].id == e) {
                "error" == i.type && n[g].has_many_image[0] && (n[g].has_many_image[0].url = "https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/img_404.png"), 
                r = n[g];
                break;
            }
            this.data.imgCount += 1;
            var m = this.data.activitys1, h = this.data.activitys2;
            t <= a ? (t += 176 / d + 60, m.push(r)) : (a += 176 / d + 60, h.push(r));
            var c = {
                activitys1: m,
                activitys2: h
            };
            this.data.imgCount >= this.data.goodsData.length && this.setData({
                showLoading: !0
            }), this.setData(c);
        }
    }
});